<div nz-form-item nz-row style="margin-top:15px;margin-bottom:10px;">
  <div nz-col [nzSpan]="6">
    <button nz-button [nzType]="'primary'" [nzSize]="'small'" col-offset-2 (click)="toBack()">
      <i class="anticon anticon-left"></i>
      <span>返回</span>
    </button>
  </div>
</div>
<div class="maintenance-record">
  <nz-collapseset>
    <nz-collapse [nzTitle]="'查询'" [nzActive]="true">
      <form nz-form [nzLayout]="'inline'">
        <div nz-form-item nz-col [nzSpan]="6">
          <div nz-form-label nz-col [nzSm]="9" [nzXs]="6">
            <label>注册代码</label>
          </div>
          <div nz-form-control>
            <nz-input name="elevatorNum" [(ngModel)]="maintenanceBean.elevatorNum">
            </nz-input>
          </div>
        </div>
        <button nz-button [nzSize]="'large'" [nzType]="'primary'" (click)="query()">查询</button>
      </form>
    </nz-collapse>
  </nz-collapseset>
  <nz-table #nzTable [nzDataSource]="list" nzSize="middle" [nzBordered]="true" [nzIsPagination]="false" (nzDataChange)="displayDataChange($event)">
    <thead nz-thead>
      <tr>
        <th nz-th [nzCheckbox]="true">
          <label nz-checkbox [(ngModel)]="allChecked" [nzIndeterminate]="indeterminate" (ngModelChange)="checkAll($event)">
          </label>
        </th>
        <th nz-th>
          <span>注册代码</span>
        </th>
        <th nz-th>
          <span>维修人员签字</span>
        </th>
        <th nz-th>
          <span>确认人签字</span>
        </th>
        <th nz-th>
          <span>报修时间</span>
        </th>
        <th nz-th>
          <span>修复时间</span>
        </th>
        <th nz-th>
          <span>修复状态</span>
        </th>
        <th nz-th>
          <span>详情</span>
        </th>
      </tr>
    </thead>
    <tbody nz-tbody>
      <tr nz-tbody-tr *ngFor="let data of list">
        <td nz-td [nzCheckbox]="true">
          <label nz-checkbox [nzDisabled]="data.disabled" [(ngModel)]="data.checked" (ngModelChange)="refreshStatus($event)">
          </label>
        </td>
        <td nz-td>{{data.elevatorNum}}</td>
        <td nz-td>
          <img *ngIf="data.maintSignUrl" src="{{data.maintSignUrl}}" width="120px" height="40px" />
        </td>
        <td nz-td>
          <img *ngIf="data.safeSignUrl" src="{{data.safeSignUrl}}" width="120px" height="40px" />
        </td>
        <td nz-td>{{data.reportDate | timeTrans}}</td>
        <td nz-td>{{data.resolveDate | timeTrans}}</td>
        <td nz-td>{{data.isRepaired==1?"已修复":"未修复"}}</td>
        <td nz-td>
          <span>
            <button nz-button [nzSize]="'small'" [nzType]="'primary'" (click)="toDetail(data.id)">查看</button>
          </span>
        </td>
      </tr>
    </tbody>
  </nz-table>
  <nz-pagination [nzPageIndex]="maintenanceBean.currentPage" nzShowTotal [nzTotal]="total" nzShowSizeChanger (nzPageSizeChange)="nzPageSizeChange($event)"
    (nzPageIndexChange)="nzPageIndexChange($event)" (nzPageIndexClickChange)="nzPageIndexClickChange($event)" [nzPageSize]="maintenanceBean.pageSize"></nz-pagination>
</div>
